package com.canyou.controller;

import com.canyou.model.Role;
import com.jfinal.core.Controller;

/**
 * 主页
 * 
 * @created cgz 2012-12-15
 */
public class DefaultController extends Controller {

	public void index() {
		setAttr("userName", getSessionAttr("UserName"));
		Role role = Role.dao.findById(getSessionAttr("RoleId"));
		setAttr("roleName", null != role ? role.getStr("RoleName") : "未知");
		render("/default.jsp");
	}
}
